package com.dbdata.move.model;

// Generated cafuc by Hibernate Tools 4

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * Teacher generated by hbm2java
 */
@Entity
@Table(name = "teacher")
public class Teacher implements java.io.Serializable {

	private long id;
	private UserBaseInfo userBaseInfo;
	private TechnicalTitle technicalTitle;
	private AdministrativeJob administrativeJob;
	private Date titleDate;
	private Date qualifiedDate;
	private boolean commander;
	private boolean englishOnly;
	private Date englishOnlyDate;
	private boolean mplTeacher;
	private Date mplTeacherDate;
	private boolean teacherTeacher;
	private Date teacherTeacherDate;
	private Float hourSubsidy;
	private Float inclineSubsidy;
	private Float flightMedal;
	private boolean inspect;
	private boolean appoint;
	private boolean quality;
	private byte incumbent;
	private Set<TeacherCertificate> teacherCertificates = new HashSet<TeacherCertificate>(
			0);
	private Set<TrainNoticePart> trainNoticeParts = new HashSet<TrainNoticePart>(
			0);
	private Set<TrainNoticePartUserBaseInfo> trainNoticePartUserBaseInfos = new HashSet<TrainNoticePartUserBaseInfo>(
			0);
	private Set<TeacherTitle> teacherTitles = new HashSet<TeacherTitle>(0);

	public Teacher() {
	}

	public Teacher(UserBaseInfo userBaseInfo, boolean commander,
			boolean englishOnly, boolean mplTeacher, boolean teacherTeacher,
			boolean inspect, boolean appoint, boolean quality, byte incumbent) {
		this.userBaseInfo = userBaseInfo;
		this.commander = commander;
		this.englishOnly = englishOnly;
		this.mplTeacher = mplTeacher;
		this.teacherTeacher = teacherTeacher;
		this.inspect = inspect;
		this.appoint = appoint;
		this.quality = quality;
		this.incumbent = incumbent;
	}

	public Teacher(UserBaseInfo userBaseInfo, TechnicalTitle technicalTitle,
			AdministrativeJob administrativeJob, Date titleDate,
			Date qualifiedDate, boolean commander, boolean englishOnly,
			Date englishOnlyDate, boolean mplTeacher, Date mplTeacherDate,
			boolean teacherTeacher, Date teacherTeacherDate, Float hourSubsidy,
			Float inclineSubsidy, Float flightMedal, boolean inspect,
			boolean appoint, boolean quality, byte incumbent,
			Set<TeacherCertificate> teacherCertificates,
			Set<TrainNoticePart> trainNoticeParts,
			Set<TrainNoticePartUserBaseInfo> trainNoticePartUserBaseInfos,
			Set<TeacherTitle> teacherTitles) {
		this.userBaseInfo = userBaseInfo;
		this.technicalTitle = technicalTitle;
		this.administrativeJob = administrativeJob;
		this.titleDate = titleDate;
		this.qualifiedDate = qualifiedDate;
		this.commander = commander;
		this.englishOnly = englishOnly;
		this.englishOnlyDate = englishOnlyDate;
		this.mplTeacher = mplTeacher;
		this.mplTeacherDate = mplTeacherDate;
		this.teacherTeacher = teacherTeacher;
		this.teacherTeacherDate = teacherTeacherDate;
		this.hourSubsidy = hourSubsidy;
		this.inclineSubsidy = inclineSubsidy;
		this.flightMedal = flightMedal;
		this.inspect = inspect;
		this.appoint = appoint;
		this.quality = quality;
		this.incumbent = incumbent;
		this.teacherCertificates = teacherCertificates;
		this.trainNoticeParts = trainNoticeParts;
		this.trainNoticePartUserBaseInfos = trainNoticePartUserBaseInfos;
		this.teacherTitles = teacherTitles;
	}

	@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "userBaseInfo"))
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "ID", unique = true, nullable = false)
	public long getId() {
		return this.id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@PrimaryKeyJoinColumn
	public UserBaseInfo getUserBaseInfo() {
		return this.userBaseInfo;
	}

	public void setUserBaseInfo(UserBaseInfo userBaseInfo) {
		this.userBaseInfo = userBaseInfo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TITLE_ID")
	public TechnicalTitle getTechnicalTitle() {
		return this.technicalTitle;
	}

	public void setTechnicalTitle(TechnicalTitle technicalTitle) {
		this.technicalTitle = technicalTitle;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ADMINISTRATIVE_JOB_ID")
	public AdministrativeJob getAdministrativeJob() {
		return this.administrativeJob;
	}

	public void setAdministrativeJob(AdministrativeJob administrativeJob) {
		this.administrativeJob = administrativeJob;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "TITLE_DATE", length = 19)
	public Date getTitleDate() {
		return this.titleDate;
	}

	public void setTitleDate(Date titleDate) {
		this.titleDate = titleDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "QUALIFIED_DATE", length = 19)
	public Date getQualifiedDate() {
		return this.qualifiedDate;
	}

	public void setQualifiedDate(Date qualifiedDate) {
		this.qualifiedDate = qualifiedDate;
	}

	@Column(name = "COMMANDER", nullable = false)
	public boolean isCommander() {
		return this.commander;
	}

	public void setCommander(boolean commander) {
		this.commander = commander;
	}

	@Column(name = "ENGLISH_ONLY", nullable = false)
	public boolean isEnglishOnly() {
		return this.englishOnly;
	}

	public void setEnglishOnly(boolean englishOnly) {
		this.englishOnly = englishOnly;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "ENGLISH_ONLY_DATE", length = 19)
	public Date getEnglishOnlyDate() {
		return this.englishOnlyDate;
	}

	public void setEnglishOnlyDate(Date englishOnlyDate) {
		this.englishOnlyDate = englishOnlyDate;
	}

	@Column(name = "MPL_TEACHER", nullable = false)
	public boolean isMplTeacher() {
		return this.mplTeacher;
	}

	public void setMplTeacher(boolean mplTeacher) {
		this.mplTeacher = mplTeacher;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "MPL_TEACHER_DATE", length = 19)
	public Date getMplTeacherDate() {
		return this.mplTeacherDate;
	}

	public void setMplTeacherDate(Date mplTeacherDate) {
		this.mplTeacherDate = mplTeacherDate;
	}

	@Column(name = "TEACHER_TEACHER", nullable = false)
	public boolean isTeacherTeacher() {
		return this.teacherTeacher;
	}

	public void setTeacherTeacher(boolean teacherTeacher) {
		this.teacherTeacher = teacherTeacher;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "TEACHER_TEACHER_DATE", length = 19)
	public Date getTeacherTeacherDate() {
		return this.teacherTeacherDate;
	}

	public void setTeacherTeacherDate(Date teacherTeacherDate) {
		this.teacherTeacherDate = teacherTeacherDate;
	}

	@Column(name = "HOUR_SUBSIDY", precision = 12, scale = 0)
	public Float getHourSubsidy() {
		return this.hourSubsidy;
	}

	public void setHourSubsidy(Float hourSubsidy) {
		this.hourSubsidy = hourSubsidy;
	}

	@Column(name = "INCLINE_SUBSIDY", precision = 12, scale = 0)
	public Float getInclineSubsidy() {
		return this.inclineSubsidy;
	}

	public void setInclineSubsidy(Float inclineSubsidy) {
		this.inclineSubsidy = inclineSubsidy;
	}

	@Column(name = "FLIGHT_MEDAL", precision = 12, scale = 0)
	public Float getFlightMedal() {
		return this.flightMedal;
	}

	public void setFlightMedal(Float flightMedal) {
		this.flightMedal = flightMedal;
	}

	@Column(name = "INSPECT", nullable = false)
	public boolean isInspect() {
		return this.inspect;
	}

	public void setInspect(boolean inspect) {
		this.inspect = inspect;
	}

	@Column(name = "APPOINT", nullable = false)
	public boolean isAppoint() {
		return this.appoint;
	}

	public void setAppoint(boolean appoint) {
		this.appoint = appoint;
	}

	@Column(name = "QUALITY", nullable = false)
	public boolean isQuality() {
		return this.quality;
	}

	public void setQuality(boolean quality) {
		this.quality = quality;
	}

	@Column(name = "INCUMBENT", nullable = false)
	public byte getIncumbent() {
		return this.incumbent;
	}

	public void setIncumbent(byte incumbent) {
		this.incumbent = incumbent;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "teacher")
	public Set<TeacherCertificate> getTeacherCertificates() {
		return this.teacherCertificates;
	}

	public void setTeacherCertificates(
			Set<TeacherCertificate> teacherCertificates) {
		this.teacherCertificates = teacherCertificates;
	}

	@ManyToMany(fetch = FetchType.LAZY)
	@JoinTable(name = "train_notice_part_teacher", joinColumns = { @JoinColumn(name = "TEACHER_ID", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "TRAIN_NOTICE_PART_ID", nullable = false, updatable = false) })
	public Set<TrainNoticePart> getTrainNoticeParts() {
		return this.trainNoticeParts;
	}

	public void setTrainNoticeParts(Set<TrainNoticePart> trainNoticeParts) {
		this.trainNoticeParts = trainNoticeParts;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "teacher")
	public Set<TrainNoticePartUserBaseInfo> getTrainNoticePartUserBaseInfos() {
		return this.trainNoticePartUserBaseInfos;
	}

	public void setTrainNoticePartUserBaseInfos(
			Set<TrainNoticePartUserBaseInfo> trainNoticePartUserBaseInfos) {
		this.trainNoticePartUserBaseInfos = trainNoticePartUserBaseInfos;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "teacher")
	public Set<TeacherTitle> getTeacherTitles() {
		return this.teacherTitles;
	}

	public void setTeacherTitles(Set<TeacherTitle> teacherTitles) {
		this.teacherTitles = teacherTitles;
	}

}
